//
// Created by v on 2021/5/7.
//

#include <iostream>
#include <vector>

std::vector<int> fib_init(int first, int second, int num)
{
    std::vector<int> result = std::vector<int>(num);
    result[0]               = first;
    result[1]               = second;

    for (int i = 2; i < num; i++)
    {
        result[i] = result[i - 2] + result[i - 1];
    }
    return result;
}

int main(int argc, char **args)
{
    int              first  = 2;
    int              second = 3;
    int              num    = 28;
    std::vector<int> result = fib_init(first, second, num);
    for (int i = 0; i < result.size(); i++)
    {
        std::cout << result[i] << " ";
    }
    return 0;
}